﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Data;

namespace Admin.WorkFlow.FormTable.PromiseSubContract
{
    public partial class PromiseSubContract_ReadOnly : System.Web.UI.Page
    {
        public string strid = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
                {
                    int PromiseSubContractId = (ChinaSoft.Common.Input.SetInt(Request.Params["id"]));
                    ShowInfo(PromiseSubContractId);
                }
            }
        }

        private void ShowInfo(int PromiseSubContractId)
        {
            ChinaSoft.BLL.Common.Bind bllBind = new ChinaSoft.BLL.Common.Bind();
            DataSet ds = bllBind.GetDataSet("*", "V_PromiseSubContractShow", "PromiseSubContractId=" + PromiseSubContractId);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr = ds.Tables[0].Rows[0];
                this.lblOrganizeName.Text = dr["OrganizeName"].ToString();
                this.lblProjectNumber.Text = dr["ProjectNumber"].ToString();
                this.lblProjectName.Text = dr["ProjectName"].ToString();
                this.lblStage.Text = dr["Stage"].ToString();
                this.lblContractName.Text = dr["ContractName"].ToString();
                this.lblMobile.Text = dr["Mobile"].ToString();
                this.lblReason.Text = dr["Reason"].ToString();
            }

        }
    }
}